import { postJson,putWithParams,get } from "../http/request";

//添加申请记录
export function addApplicationRecord(data) {
    return postJson('/application-records/add', data);
}

//查询领导需要审批的申请
export function getLeaderApprovalList(data){
    return postJson('/application-records/getLeaderApprovalList',data);
}

//查看个人申请记录
export function getPersonalRecords(data){
    return postJson('/application-records/getPersonalRecords',data);
}

//查看个人某条申请记录
export function getPersonalSingleRecord(recordId,empId){
    return get('/application-records/getPersonSingleRecord',{recordId:recordId,empId:empId});
}

//领导审批
export function leaderApproval(recordId,empId,deptId,pass){
    return putWithParams('/application-records/leaderApproval',{recordId:recordId,empId:empId,deptId:deptId,pass:pass});
}

//员工撤销申请
export function revokeApplication(param){
    return putWithParams('/application-records/revokeApplication',{recordId:param});
}